package com.example.wx.Entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "umessage")
@Data                              //get，set
@NoArgsConstructor                 //无参构造
@AllArgsConstructor                //全参构造
@DynamicInsert
@DynamicUpdate
public class Umessage {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    @Column(name = "name")
    private String name;//名字
    @Column(name = "houseid")
    private String houseid;//房号
    @Column(name = "cardid")
    private String cardid;//身份证
    @Column(name = "temperature")
    private double temperature;//体温
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "outtime")
    private Date outtime;//出入时间
    @Column(name = "inOrout")
    private String inOrout;//是出或入

}
